package com.kx.yooli.kx.wechat.controller.minio;
import com.kx.yooli.kx.wechat.WechatApplication;
import com.kx.yooli.kx.wechat.service.IDisruptorMqService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author john_sqwen
 * @date 2024/3/19
 * @PROJECT_NAME wechat
 * @description create MinioController by john_sqwen
 * and MinioController  value is
 */
@RestController
@RequestMapping("/api/minio")
@Tag(name = "minioController",description = "minio 控制器")
public class MinioController {
    private final   Logger log = LoggerFactory.getLogger(WechatApplication.class);
    @Resource
    private IDisruptorMqService disruptorMqService;
    @RequestMapping(value = "/test",method = RequestMethod.GET)
    public String testMinio(){
        String traceId = MDC.get("traceId");
        log.info("test=============={}",traceId);
        disruptorMqService.sendMessageMq("this is test message [{}]"+ MDC.get("traceId"));
        return "success";
    }
}
